import axios from "axios";

export function requestJson8082(config) {
    const instance = axios.create({
        baseURL: 'http://localhost:8082',
        timeout: 5000,
    })
    //设置post的Content-Type
    instance.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8';
    //设置token
    instance.interceptors.request.use(
        config=>{
            config.headers.Authorization = localStorage.getItem("token");
            // console.log('*****config****requestJson',config);
            return config;
        }
    )

    return instance(config);

}